<template>
    <div class="relative flex items-top justify-center bg-gray-100 sm:items-center sm:pt-0">
        文章详情
        {{data}}
    </div>
</template>

<script>
import api from '../../utils/api'
export default {
    async asyncData ({ params }) {
        // called every time before loading the component
        console.log("params:",params.id)
        //测试请求
        const res = await api.getTest(params.id)
        console.log("res:",res)
        return { 
            name: 'World',
            data:res.data 
        }
    },
    fetch () {
        // The fetch method is used to fill the store before rendering the page
    },
    head () {
        // Set Meta Tags for this Page
    },
    // and more functionality to discover
}
</script>